import request from '@/utils/request'

/* 列表分页*/
export function selectProductPage(data) {
  return request({
    url: '/erp/product/selectProductPage',
    method: 'post',
    data: data
  })
}

/* 根据名称查询分页*/
export function selectProductByName(data) {
  return request({
    url: '/erp/product/selectProductByName',
    method: 'post',
    data: data
  })
}

/* 新增*/
export function saveProduct(data) {
  return request({
    url: '/erp/product/saveProduct',
    method: 'post',
    data: data
  })
}

/* 详情*/
export function selectProductById(data) {
  return request({
    url: '/erp/product/selectProductById/' + data,
    method: 'post'
  })
}

/* 修改*/
export function updateProductById(data) {
  return request({
    url: '/erp/product/updateProductById',
    method: 'post',
    data: data
  })
}

/* 删除*/
export function deleteProduct(data) {
  return request({
    url: '/erp/product/deleteProduct',
    method: 'post',
    data: data
  })
}
